<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="${staticServer}/inc/style/main.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/page.css" />
<link rel="stylesheet" href="${staticServer}/css/work_today.css" />
<link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css" />
<script src="${staticServer}/inc/js/jquery.js"></script>
<script src="${staticServer}/inc/js/pageset.js"></script>
<script src="${staticServer}/inc/js/datepicker.js"></script>
<script src="${staticServer}/inc/js/infopad.js?2.2"></script>

</head>
<script>
$(function(){
	
	$("#center").val("${center}");
	$("#zhiw").val("${zhiw}");
	$("#username").val("${username}");

});

  
          var selectMsg = function(){
            	var center = $("#center").val();
	            var username = $("#username").val();
	            var zhiw = $("#zhiw").val();
	            window.location.href=encodeURI("${contextPath}/recruitment/good_provide_list.htm?center="+center+"&username="+username+"&zhiw="+zhiw);
           }
           
           
          function xzToExcel() {
            var center = $("#center").val();
	        var username = $("#username").val();
	        var zhiw = $("#zhiw").val();
	            
            $.post('${contextPath}/recruitment/xzRecruit.json', {
                center: center,
                username: username,
                zhiw: zhiw,
            }, function (data) {
                if (data) {
                    if (data.name != null) {
                        window.location.href = "http://120.55.241.58//mydata/uploadtea/xls/" + data.name;
                    }
                }
            });
        }

</script>
<body>

	<div id="container">
		<div id="title">物品信息</div>
		
		<table class="form_table">
			<tbody>
			<tr>
			   <td>
				    <label for="nickname">所属中心：</label> 
					<select id="center" >
					<option value=""></option>
	            		<#if office_List??>
	              			<#list office_List as ls>
	              				<option value="${ls.name}">${ls.name}</option>
	              			</#list>
	            		</#if>
	            	</select>	
	            	<label for="nickname">姓名：</label>
					<input type="text" id="username" value=""  />
					<label for="nickname">所属部门：</label>
					<select id="zhiw" >
					<option value=""></option>
	            		<#if depList??>
	              			<#list depList as zw>
	              				<option value="${zw.name}">${zw.name}</option>
	              			</#list>
	            		</#if>
	            	</select>	
					 
					<input type="button" value=" 查 询 " onclick="selectMsg()" />
					<input type="button" value=" 下 载 " onclick="xzToExcel()" />
					<a href="${contextPath}/recruitment/add_good_provide.htm"><input type="button" value=" 添加物品发放信息 "></a>	
				</td>
			</tr>
			
			</tbody>
		
		<table>
			<tr class="fields">
				<th width="100">中心</th>
				<th width="100">姓名</th>
				<th width="120">入司日期</th>
				<th width="100">职位</th>
				<th width="200">发放物品</th>
				<th width="120">登记日期</th>
				<th width="100">经手人</th>
				<th width="200">备注</th>
				<th width="100">操作</th>
			</tr>
			<#list list as list>
				<tr class="even_row">
			    	<td align="center"><#if list.center??>${list.center}</#if></td>
			    	<td align="center"><#if list.username??>${list.username}</#if></td>
					<td align="center"><#if list.date_of_entry??>${list.date_of_entry}</#if></td>
					<td align="center"><#if list.post??>${list.post}</#if>
				    <td align="center"><#if list.good??>${list.good}</#if>
                    <td align="center"><#if list.date_of_regist??>${list.date_of_regist}</#if></td>
					<td align="center"><#if list.handle_person??>${list.handle_person}</#if></td>
                   <td align="center"><#if list.beizhu??>${list.beizhu}</#if></td>
	                <td align="center"><a href="${contextPath}/recruitment/add_good_provide.htm?id=${list.id}">编辑</a></td>
				</tr>
			</#list>
		</table>
	</div>
	<div id="pager" style="width: 820px;">
	<ul id="pagination">
		<#if page??>
		<#if page.pagetotal?? && page.pagetotal!="0">
	<#assign pagetotal = page.pagetotal>
	<#else>
	<#assign pagetotal = 1>
	</#if>
			<#if page.currpage??>
	<#assign currpage = page.currpage>
	<#else>
	<#assign currpage = 1>
	</#if>
				<#if currpage==1 >
					<li class="previous-off">上一页</li>
					<#else>
					<li class="previous"><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${currpage-1}&username=${username}&center=${center}">上一页</a></li>
					</#if>
					
		<#if pagetotal<=11>
			<#list 1..pagetotal as index_up>  
	           <#if currpage==index_up > 
	           		<li class="current">${index_up}</li>
	           <#else>
	           		<li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${index_up}&username=${username}&center=${center}">${index_up}</a></li>  
	           </#if>  
			</#list>  
		<#else>
			<#if currpage<=8 >
				<#list 1..9 as index_up>  
	           	<#if currpage==index_up >  
	            	<li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${index_up}&username=${username}&center=${center}">${index_up}</a></li> 
	           	</#if>
	           	</#list>  
	           	<li>...</li>
	           	<li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${pagetotal}&username=${username}&center=${center}">${pagetotal}</a></li>  
				
			<#elseif (currpage>= 9 && currpage<pagetotal-7)  >	
				<li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=1&username=${username}&center=${center}">1</a></li>  
				<li>...</li>
				<#list currpage-3..currpage+3 as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}</li>
	           	<#else>  
	               <li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${index_up}&username=${username}&center=${center}">${index_up}</a></li>  
	           	</#if>
	           	</#list>
				<li>...</li>
	           	<li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${pagetotal}&username=${username}&center=${center}">${pagetotal}</a></li>   
			<#else>
				<li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=1&username=${username}&center=${center}">1</a></li> 
				<li>...</li>
				<#list pagetotal-8..pagetotal as index_up>  
	           	<#if currpage==index_up >  
	             <li class="current">${index_up}&dateday=${dateday}&datemoth=${datemoth}&name=${name}</li>
	           	<#else>  
	               <li><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${index_up}&username=${username}&center=${center}">${index_up}</a></li> 
	           	</#if>
				</#list>  
			</#if>
			
		</#if> 
		<#if currpage==pagetotal >
		 	<li class="previous-off">下一页</li>
		<#else>
			<li class="previous"><a href="${contextPath}/recruitment/good_provide_list.htm?currPage=${currpage+1}&username=${username}&center=${center}">下一页</a></li>
		</#if>
		<li class="pageinfo">共${page.total}条记录</li>
	</#if>
	</ul>
	</div>
	<div class="emptyline clear"></div>
</body>
</html>